package com.ok.prize.controller;


import com.ok.common.domain.po.Result;
import com.ok.prize.domain.po.OkPrizeCategory;
import com.ok.prize.service.IOkPrizeCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 奖品分类 前端控制器
 * </p>
 *
 * @author lhw
 * @since 2024-05-06
 */
@Api(tags = "奖品分类接口")
@RestController
@RequestMapping("/prize-category")
@RequiredArgsConstructor
public class OkPrizeCategoryController {

    private final IOkPrizeCategoryService okPrizeCategoryService;

    @ApiOperation("获取奖品分类列表")
    @GetMapping("/list")
    public Result list(){
        List<OkPrizeCategory> list = okPrizeCategoryService.list();
        return Result.success(list);
    }

}
